package org.siqisource.webstart.core.widgets.messagetip.service;

import org.siqisource.webstart.core.widgets.messagetip.constants.MessaegTipType;
import org.siqisource.webstart.core.widgets.messagetip.model.MessageTip;

public class MessageTipService {

	public static final int DEFAULT_TIME_OUT = 1500;
	
	public static final String DEFAULT_SUCCESS_CONTENT = "SUCCESS_DONE";
	
	public static final String DEFAULT_TITLE = "TIP";

	public static MessageTip getSuccessMessageTip() {
		MessageTip messageTip = new MessageTip();
		messageTip.setTitle(DEFAULT_TITLE);
		messageTip.setContent(DEFAULT_SUCCESS_CONTENT);
		messageTip.setTimeout(DEFAULT_TIME_OUT);
		messageTip.setType(MessaegTipType.SUCCESS);
		
		return messageTip;
	}

	public static MessageTip getErrorMessageTip(String content) {
		MessageTip messageTip = new MessageTip();
		messageTip.setContent(content);
		messageTip.setTimeout(DEFAULT_TIME_OUT);
		messageTip.setType(MessaegTipType.ERROR);
		return messageTip;
	}
}
